#include <string.h>
#include <stddef.h>
#include <yonex/limits.h>
#include <stdint.h>

void *memrchr(const void *src, int c, size_t n)
{
    const char *s = src;
    c = (unsigned char)c;

    while (n--) if (s[n]==c) return (void *)(s+n);
	return NULL;
}
